tests/gpg-verify-data: Empty out trustdb.gpg
authorDan Nicholson <nicholson@endlessm.com>
Fri, 21 Jun 2019 12:09:43 +0000 (07:09 -0500)
committerDan Nicholson <nicholson@endlessm.com>
Fri, 24 Jan 2020 20:02:09 +0000 (13:02 -0700)
commitb786d1b4bc124e43b1f72d7a519845f7ec05c713
treef1ba29dd782c87fe678d3be9c0a6af1fe51cc356
parent7fe265b08706677ae99512402dfaaa3830087bdf
tests/gpg-verify-data: Empty out trustdb.gpg

When the private keys were generated, gpg added an ultimate trust entry
since you normally want to trust your own keys. However, this throws off
the expired signature testing since gpgme considers it valid if the key
is fully or ultimately trusted.

The use of a trustdb for the test-gpg-verify-result is unlike any other
GPG verification in ostree. Under normal circumstances, a temporary GPG
homedir is created without any trust information, so all keys are
treated as having unknown trust.

Regenerate an empty trustdb.gpg in gpg-verify-data so that the tests
behave as ostree normally operates. After this the expired signature
testing correctly shows up as a non-valid signature. The trustdb was
regenerated by simply removing it and running any gpg operation with the
gpg-verify-data directory as the homedir.
tests/gpg-verify-data/trustdb.gpg
tests/test-gpg-verify-result.c